// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	10/16/2014 6:44:26 PM				
// -----------------------------

#ifndef _RenderPass_h
#define _RenderPass_h

#include "Common.h"

class Application;
class RenderManager;
class Scene;

struct RenderTargets
{
	IRenderTarget*		OutputTarget;
	IRenderTarget*		RawRenderTarget3D;
	IRenderTarget*		PostRenderTarget3D;
	IRenderTarget2D*	RenderTarget2D;
	IDepthStencil*		DepthStencil;
	IRenderTarget*		PositionTarget;
	IRenderTarget*		NormalTarget;
	IRenderTarget*		AlbedoTarget;
	IRenderTarget*		AmbientTarget;
};

class RenderPass
{
public:
	virtual ~RenderPass();

	virtual void	Init(Application* lpApp);
	virtual void	Apply(Application* lpApp, Scene* lpScene);
	virtual void	UpdateTargets(Application* lpApp, const RenderTargets& targets);

	void			SetEnabled(Bool bEnabled, Bool bVerbose = true);

	const AString&	GetName() const;
	Bool			IsEnabled() const;

protected:
	RenderPass(RenderManager* lpRenderManager, const AString& passName, const RenderTargets& targets);

	RenderManager*	m_lpRenderManager;
	AString			m_Name;
	Bool			m_bEnabled;
	RenderTargets	m_Targets;

private:
	RenderPass(const RenderPass& refRenderPass);
	RenderPass& operator=(const RenderPass& refRenderPass);
};

#endif